home *** CD-ROM | disk | FTP | other *** search
- /*
- © Copyright 1989 Apple Computer, Inc.
-
- By Ricardo Batista
-
-
- This file contains a code resource which is used within 4-Dimension
- to provide print queue management whitin 4D in Macintosh Portables.
-
- The idea is that when the user launches 4D, we take PrintMonitor out
- of the System Folder with a call to PrintQueue(), the effect of this is
- that if the user prints something from 4D PrintMonitor will not be
- launched and therefore it will not attempt to print and bother the user
- with messages, the user is using a Portable Macintosh and may not be
- connected to a network at the moment, therefore he just wants the print
- outs to be spooled but he doesn't want PrintMonitor to bother him.
- Once they quit 4D we restore the place of PrintMonitor. If the user
- goes to his office and connects to a network he'll want to print, for
- this he selects a menu option of 4D and we will restore PrintMonitor
- in the system folder so it is launched by Backgrounder.
-
- Notice that if the user selects the chooser to select a printer before
- he tell us he wants to print, background printing will be disabled from
- the chooser automatically by the laserwriter driver. (Maybe I'll do something
- about that)
-
- The other function we provide is management of the print queue within
- 4D, to dot this our ModifyPrintQueue() is called, which shows the current
- spooled files in a window, in this window we allow the user to change
- the print order. PrintMonitor uses the files named 'Spool File 1',
- 'Spool File 2', ...etc, to change the order all we need to do is rename
- these files, the name used to print a file can be taken out of the resource
- of each of these files, under 'STR ' -8189.
-
- Note: PrintMonitor prints the files based on their creation date, but we
- like to change the name to make it easier for us.
-
-
- HISTORY:
-
- 08/25/89 RB New Today
-
-
- SPECIAL INSTRUCTIONS:
-
- Compile in THINK C as a code resource, give the resource a name that will be used
- from 4D to call this external, then use 4D Ext Mover to copy into the Proc.Ext file
- of the database to have print queue management.
-
- */
-
-
-
-
-
-
-
-
-
-
-
-
- #include "SetupA4.h"
-
-
-
-
- typedef struct {
- int total;
- long zero1;
- Rect box1;
- char type1;
- char len1;
- char name1[2];
- long zero2;
- Rect box2;
- char type2;
- char len2;
- char name2[12];
- long zero3;
- Rect box3;
- char type3;
- char len3;
- char name3[14];
- long zero4;
- Rect box4;
- char type4;
- char len4;
- long zero5;
- Rect box5;
- char type5;
- char len5;
- char name5[12];
- } dItem;
-
-
-
-
- #define okItem 1
- #define upItem 2
- #define downItem 3
- #define listItem 4
-
-
- #define cancelItem 2
-
-
- #define ZoneDlg 16000
-
-
- #define GetZoneList 0x8000000
- #define GetMyZone 0x7000000
-
-
-
-
-
-
-
-
- /*
- This function extracts names and addresses out of a buffer filled by NBP
- */
-
-
- int myNBPExtract(buffer,howMany,which,Name,Addr)
- char *buffer;
- int howMany;
- int which;
- EntityName *Name;
- AddrBlock *Addr;
- {
- char *p;
- register int index = 1, nameCounter = 0;
-
- p = buffer;
- while ((index < which) && (index < howMany)) {
- p += 5; /* skip addr and enumerator */
- p += (*p) + 1; /* skip name */
- p += (*p) + 1; /* skip type */
- p += (*p) + 1; /* skip zone */
- index++;
- }
- BlockMove(p,Addr,4L);
- p += 5;
- BlockMove(p,Name->objStr,33L);
- p += (*p) + 1;
- BlockMove(p,Name->typeStr,33L);
- p += (*p) + 1;
- BlockMove(p,Name->zoneStr,33L);
- return(0);
- }
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- This function fills in zone name with a default value, then if there are
- any zone names we show them to the user and allow them to select one of these
- zones. Once a zone is selected we look for LaserWriters and we allow the user
- to select one as the new destination printer.
- If everything goes ok we return true (okItem), if user cancels we return
- false (0).
- */
-
-
- Boolean GetAZone(char *zone, char *printerName)
- {
- int abridge;
- DialogPtr aDialog;
- Point where;
- ListHandle z;
- int item,node,net,howMany,zones,err;
- Rect zBox,bounds;
- long ourData;
- Point cell;
- Handle H;
- Boolean done = FALSE;
- unsigned char dummy[4];
- register int counter,index;
- Ptr aBuf;
- int datalen;
- Boolean doubleClick;
- DialogRecord d;
- Rect box;
- GrafPtr savePort;
- ATPParamBlock a;
- MPPParamBlock p;
- BDSElement bds;
- char Entity[100];
- int howManyNames, nameCounter, nameIndex;
- EntityName name;
- AddrBlock tempAddr;
-
- SetCursor(*GetCursor(watchCursor));
- zone[0] = 1;
- zone[1] = '*';
- asm {
- move.l 0x2D8,a0
- clr.w abridge
- move.b 0x19(a0),abridge+1
- move.w 0x1A(a0),net
- clr.w node
- move.b (a0),node+1
- }
- if (abridge == 0)
- return(TRUE);
- aBuf = NewPtr(2000L);
- if (!aBuf) {
- SysBeep(1);
- return;
- }
- GetPort(&savePort);
- aDialog = GetNewDialog(ZoneDlg,&d,-1L);
- SetPort(aDialog);
- GetDItem(aDialog,4,&item,&H,&zBox);
- DrawDialog(aDialog);
- SetRect(&bounds,0,0,0,0);
- zBox.right -= 15;
- cell.h = cell.v = 0;
- z = LNew(&zBox,&bounds,cell,0,aDialog,TRUE,FALSE,FALSE,TRUE);
- (*z)->selFlags |= lNoNilHilite + lNoRect + lNoExtend + lNoDisjoint + lOnlyOne;
- zBox.top--;
- zBox.left--;
- zBox.right++;
- zBox.bottom++;
- LActivate(TRUE,z);
- LAutoScroll(z);
- LAddColumn(1,0,z);
- FrameRect(&zBox);
- howMany = zones = 0;
- cell.v = cell.h = 0;
- ourData = 0;
- a.userData = GetZoneList;
- a.atpFlags = 0;
- a.addrBlock.aNode = abridge;
- a.addrBlock.aNet = net;
- a.addrBlock.aSocket = 6;
- a.reqLength = 0;
- a.reqPointer = 0L;
- a.ATPnumOfBuffs = 1;
- a.ATPtimeOutVal = 4;
- a.ATPretryCount = 3;
- a.bdsPointer = (Ptr) &bds;
- bds.buffSize = 600;
- bds.buffPtr = aBuf;
- bds.dataSize = 0;
- bds.userBytes = 0L;
- aBuf[0] = 0;
- ourData = 1;
- FrameRect(&zBox);
- zones = 0;
- while (!done) {
- ourData |= GetZoneList;
- a.userData = ourData;
- err = PSendRequest(&a,FALSE);
- if (err) {
- done = TRUE;
- zones = 0;
- }
- BlockMove(&bds.userBytes,&dummy[0],4L);
- BlockMove(&dummy[2],&howMany,2L);
- zones += howMany;
- ourData = zones;
- if (!done) {
- if (howMany)
- LAddRow(howMany,zones,z);
- for (counter = 0, index = 0; counter < howMany; counter++) {
- LSetCell(&aBuf[index + 1],(int) aBuf[index],cell,z);
- cell.v++;
- index += aBuf[index] + 1;
- }
- FrameRect(&zBox);
- }
- if (!done)
- done = dummy[0];
- }
- if (zones) {
- a.userData = GetMyZone;
- err = PSendRequest(&a,FALSE);
- cell.v = cell.h = 0;
- datalen = aBuf[0];
- LSearch(&aBuf[1],datalen,0L,&cell,z);
- LSetSelect(TRUE,cell,z);
- LAutoScroll(z);
- }
- GetDItem(aDialog,okItem,&item,&H,&box);
- PenSize(3,3);
- InsetRect(&box,-4,-4);
- FrameRoundRect(&box,16,16);
- PenNormal();
- if (zones) {
- InitCursor();
- item = cell.v = 0;
- while ((item != okItem) && (item != cancelItem)) {
- ModalDialog(0L,&item);
- if (item == 4) {
- cell.v = 0;
- GetMouse(&where);
- if (LClick(where,0,z) && LGetSelect(TRUE,&cell,z))
- item = okItem;
- }
- if (item == okItem) {
- cell.v = cell.h = 0;
- if (!LGetSelect(TRUE,&cell,z)) {
- zone[0] = 1;
- zone[1] = '*';
- }
- else {
- datalen = 33;
- LGetCell(&(zone[1]),&datalen,cell,z);
- zone[0] = datalen;
- }
- }
- }
- }
- if (item == cancelItem) {
- LDispose(z);
- CloseDialog(aDialog);
- SetPort(savePort);
- DisposPtr(aBuf);
- return(FALSE);
- }
- /* The user selected a zone, or there are no zones,
- now let's find the LaserWriters' name */
- SetCursor(*GetCursor(watchCursor));
- GetDItem(aDialog,3,&item,&H,&box);
- SetIText(H,"\pPlease select a LaserWriter :");
- howManyNames = (**z).dataBounds.bottom;
- LDelRow(howManyNames,0,z);
- BlockMove("\p=",Entity,2L);
- nameIndex = Entity[0] + 1;
- BlockMove("\pLaserWriter",&Entity[nameIndex],12L);
- nameIndex += 12;
- BlockMove(zone,&Entity[nameIndex],33L);
- p.NBPinterval = 5;
- p.NBPcount = 4;
- p.NBPentityPtr = Entity;
- p.NBPretBuffPtr = aBuf;
- p.NBPretBuffSize = 2000;
- p.NBPmaxToGet = 2000 / 110;
- err = PLookupName(&p,FALSE);
- howManyNames = p.NBPnumGotten;
- cell.v = cell.h = 0;
- if (howManyNames) {
- nameCounter = 1;
- while (nameCounter < (howManyNames + 1)) {
- err = myNBPExtract(aBuf,howManyNames,nameCounter,&name,&tempAddr);
- LAddRow(1,cell.v,z);
- LSetCell(&(name.objStr[1]),(int) name.objStr[0],cell,z);
- cell.v++;
- nameCounter++;
- }
- InitCursor();
- item = cell.v = 0;
- while ((item != okItem) && (item != cancelItem)) {
- ModalDialog(0L,&item);
- if (item == 4) {
- cell.v = 0;
- GetMouse(&where);
- if (LClick(where,0,z) && LGetSelect(TRUE,&cell,z))
- item = okItem;
- }
- if (item == okItem) {
- cell.v = cell.h = 0;
- if (!LGetSelect(TRUE,&cell,z))
- item = cancelItem;
- else {
- datalen = 33;
- LGetCell(&(printerName[1]),&datalen,cell,z);
- printerName[0] = datalen;
- }
- }
- }
- }
- else
- SysBeep(1);
- LDispose(z);
- CloseDialog(aDialog);
- DisposPtr(aBuf);
- SetPort(savePort);
- InitCursor();
- if (item == cancelItem)
- return(FALSE);
- return(TRUE);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- This function is called when the user double clicks on a print out name in the
- print queue listing, it is used to allow the user to select a new printer for
- that document, this is done because the user may have printed documents while
- outside an office and didn't know what printer he was going to use, the spool
- file already contains the name of a printer, and if the printer is not found
- the document is lost, so here he has a chance to change the printer for a
- given document. Good Stuff !
- */
-
- void ChangeType(int index, ListHandle myList, int *volume, long *dirID)
- {
- char zone[40], printerName[40];
- Handle H;
- int file;
- char name[70];
- Point cell;
- int temp;
- char num[10];
- int len, counter;
- long size;
-
- if (GetAZone(zone,printerName)) {
- cell.h = 1;
- cell.v = index;
- len = 2;
- LGetCell(&temp,&len,cell,myList);
- BlockMove("\pSpool File ",name,12L);
- NumToString((long) temp, (StringPtr) num);
- BlockMove(&num[1],&name[12],3L);
- name[0] += num[0];
- file = HOpenResFile(*volume,*dirID,name,fsRdWrPerm);
- if (file != -1) {
- H = GetResource('PAPA',-8192);
- if (H) {
- LoadResource(H);
- HLock(H);
- len = printerName[0] + 1;
- counter = 0;
- BlockMove(printerName,&((*H)[counter]),(long) len);
- counter += len;
- BlockMove("\pLaserWriter",&((*H)[counter]),12L);
- counter += 12;
- len = zone[0] + 1;
- BlockMove(zone,&((*H)[counter]),(long) len);
- counter += len;
- size = 0L;
- BlockMove(size,&((*H)[counter]),4L);
- HUnlock(H);
- ChangedResource(H);
- WriteResource(H);
- }
- H = GetResource('PREC',124);
- if (H) {
- LoadResource(H);
- len = printerName[0] + 1;
- SetHandleSize(H,(long) len);
- HLock(H);
- BlockMove(printerName,*H,(long) len);
- HUnlock(H);
- ChangedResource(H);
- WriteResource(H);
- }
- CloseResFile(file);
- }
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- This function reads the new order of the spool files from the list and
- make any adjustments as nessesary in order to print the items of the list
- in the order the user has selected. We do this by renaming the spool files
- and changing the creation date.
- */
-
- void AdjustQueue(ListHandle myList, int *volume, long *dirID)
- {
- int err;
- char name[70], num[10];
- register int index, total;
- CInfoPBRec info;
- HFileParam p;
- ioParam *io;
- Boolean changed = FALSE;
- int temp, len;
- Point cell;
- long time;
-
- total = (**myList).dataBounds.bottom;
- if (!total)
- return;
- len = 2;
- cell.h = 1;
- cell.v = 0;
- for (index = 0; index < total; index++) {
- cell.v = index;
- LGetCell(&temp,&len,cell,myList);
- cell.v++;
- if (cell.v != temp) {
- changed = TRUE;
- index = total;
- }
- }
- if (!changed)
- return;
- time = Time;
- BlockMove("\pSpool File ",name,12L);
- p.ioCompletion = 0L;
- p.ioVRefNum = *volume;
- p.ioDirID = *dirID;
- io = (ioParam*) &p;
- p.ioNamePtr = (StringPtr) name;
- io->ioMisc = (Ptr) num;
- err = 0;
- index = 1;
- while (!err) {
- NumToString((long) index, (StringPtr) num);
- BlockMove(&num[1],&name[12],3L);
- name[0] = 11 + num[0];
- err = PBHRename(io,FALSE);
- index++;
- }
- cell.h = 1;
- len = 2;
- info.hFileInfo.ioCompletion = 0L;
- info.hFileInfo.ioVRefNum = *volume;
- info.hFileInfo.ioDirID = *dirID;
- p.ioNamePtr = (StringPtr) num;
- io->ioMisc = (Ptr) name;
- for (index = 0; index < total; index++) {
- cell.v = index;
- LGetCell(&temp,&len,cell,myList);
- cell.v++;
- NumToString((long) cell.v, (StringPtr) num);
- BlockMove(&num[1],&name[12],3L);
- name[0] = 11 + num[0];
- NumToString((long) temp, (StringPtr) num);
- err = PBHRename(io,FALSE);
- info.hFileInfo.ioNamePtr = (StringPtr) name;
- info.hFileInfo.ioFDirIndex = 0;
- info.hFileInfo.ioFlAttrib = 0;
- info.hFileInfo.ioFlFndrInfo.fdFlags = 0;
- err = PBGetCatInfo(&info,FALSE);
- info.hFileInfo.ioFlCrDat = time + temp;
- info.hFileInfo.ioFDirIndex = 0;
- err = PBSetCatInfo(&info,FALSE);
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- This function reads the disk catalog and finds files called 'Spool File'
- to add these to the list given to the function, the STR -8189 is put in
- the list as the title of the print out.
- We also set volume and dirID to the right values, which will be used in
- other routines.
- */
-
- void SpoolFill(ListHandle myList, int *volume, long *dirID)
- {
- CInfoPBRec info;
- WDPBRec wd;
- int err;
- char st[70], name[70];
- register int index;
- Point cell;
- int file;
- StringHandle H;
- char num[10];
- int temp;
- SysEnvRec mac;
-
- LAddColumn(1,1,myList);
- wd.ioCompletion = 0L;
- wd.ioWDIndex = 0;
- wd.ioVRefNum = BootDrive;
- wd.ioNamePtr = 0L;
- wd.ioWDProcID = 0;
- err = PBGetWDInfo(&wd,FALSE);
- info.dirInfo.ioCompletion = 0L;
- if (mac.systemVersion < 0x700)
- info.dirInfo.ioNamePtr = (StringPtr) "\pSpool Folder";
- else
- info.dirInfo.ioNamePtr = (StringPtr) "\pPrintMonitor Documents";
- info.dirInfo.ioVRefNum = BootDrive;
- info.dirInfo.ioFDirIndex = 0;
- info.dirInfo.ioDrDirID = 0;
- err = PBGetCatInfo(&info,FALSE);
- if (err == fnfErr)
- return;
- *dirID = info.dirInfo.ioDrDirID;
- *volume = wd.ioWDVRefNum;
- index = 1;
- info.dirInfo.ioCompletion = 0L;
- info.dirInfo.ioNamePtr = (StringPtr) st;
- cell.h = cell.v = 0;
- LDoDraw(FALSE,myList);
- BlockMove("\pSpool File ",st,12L);
- file = 0;
- while (file != -1) {
- NumToString((long) index, (StringPtr) num);
- BlockMove(&num[1],&st[12],3L);
- st[0] = 11 + num[0];
- file = HOpenResFile(*volume,*dirID,st,fsRdPerm);
- if (file != -1) {
- H = GetString(-8189);
- if (H) {
- LoadResource(H);
- HLock(H);
- BlockMove(*H,name,60L);
- HUnlock(H);
- ReleaseResource(H);
- }
- if (name[0] == 0)
- BlockMove("\pUntitled",name,9L);
- CloseResFile(file);
- LAddRow(1,index - 1,myList);
- cell.h = 0;
- LSetCell(&name[1],(int) name[0],cell,myList);
- cell.h = 1;
- temp = cell.v + 1;
- LSetCell(&temp,2,cell,myList);
- cell.v++;
- }
- index++;
- }
- LDoDraw(TRUE,myList);
- }
-
-
-
-
-
-
-
-
-
-
-
- /*
- This function creates a DITL (dialog item list) in memory so we can use
- ModalDialog with our dialog, this is because we don't want the user to click
- on other windows while he is changing the order of the spool files, specially
- with MultiFinder. We create the DITL based on the structure we have defined
- at the begining of this file, we first create the ok button, move to top,
- move to bottom and user item for the list.
- NOTE:
- At this time we didn't know if we could use resources in a 4D external.
- */
-
- dItem** MakeDITL(bounds)
- Rect bounds;
- {
- dItem ** items;
- Rect box;
-
- bounds.right -= bounds.left;
- bounds.left = 0;
- bounds.bottom -= bounds.top;
- bounds.top = 0;
-
- items = (dItem**) NewHandle(sizeof(dItem));
- if (!items)
- return(0L);
- HLock(items);
- (**items).total = 4;
-
- (**items).zero1 = 0L;
- (**items).type1 = ctrlItem + btnCtrl;
- (**items).len1 = 2;
- BlockMove("OK",(**items).name1,2L);
- box.top = bounds.bottom - 30;
- box.bottom = box.top + 20;
- box.right = bounds.right - 22;
- box.left = box.right - StringWidth("\pOKOK") - 20;
- (**items).box1 = box;
-
- (**items).zero2 = 0L;
- (**items).type2 = ctrlItem + btnCtrl;
- (**items).len2 = 12;
- BlockMove("Move to top ",(**items).name2,12L);
- box.right = box.left - 15;
- box.left = box.right - StringWidth("\pMove to bottom") - 20;
- (**items).box2 = box;
-
- (**items).zero3 = 0L;
- (**items).type3 = ctrlItem + btnCtrl;
- (**items).len3 = 14;
- BlockMove("Move to bottom",(**items).name3,14L);
- box.right = box.left - 15;
- box.left = box.right - StringWidth("\pMove to bottom") - 20;
- (**items).box3 = box;
-
- (**items).zero4 = 0L;
- (**items).type4 = userItem;
- (**items).len4 = 0;
- box.top = 50;
- box.left = 20;
- box.right = bounds.right - 20;
- box.bottom = bounds.bottom - 50;
- (**items).box4 = box;
-
- (**items).zero5 = 0L;
- (**items).type5 = statText;
- (**items).len5 = 12;
- BlockMove("Print Queue:",(**items).name5,12L);
- box.top = 14;
- box.bottom = box.top + 16;
- box.left = 20;
- box.right = 200;
- (**items).box5 = box;
-
- HUnlock(items);
- return(items);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- This is the main function of this 4D external command, we receive no
- parameters, we first create the spool queue window and get the names
- from the files in the Spool Folder, after the user closes our window
- we rename some files as nessesary. (And change creation date)
- */
-
-
- pascal void main(void)
- {
- DialogPtr myDialog;
- DialogRecord dRec;
- Rect box;
- int err = 0, item = 0;
- Rect listRect, bounds, okRect;
- dItem** items;
- ListHandle myList;
- GrafPtr savePort;
- Point cell, where;
- ControlHandle top, bottom;
- char st[100];
- int number, len, total;
- Boolean changed = TRUE;
- int volume;
- long dirID;
-
- /* InitAll(); */
- RememberA0();
- SetUpA4();
- GetPort(&savePort);
- box.top = 70;
- box.bottom = box.top + 254;
- box.left = 40;
- box.right = box.left + 380;
- items = MakeDITL(box);
- if (!items) {
- SysBeep(1);
- return;
- }
- okRect = (**items).box1;
- listRect = (**items).box4;
- myDialog = NewDialog(&dRec,&box,"\pPrint Queue",1,dBoxProc,-1L,0,0L,items);
- SetPort(myDialog);
- SetRect(&bounds,0,0,1,0);
- cell.h = cell.v = 0;
- listRect.right -= 16;
- myList = LNew(&listRect,&bounds,cell,0,myDialog,1,0,0,1);
- (**myList).selFlags = lNoNilHilite + lNoRect + lNoExtend + lNoDisjoint + lOnlyOne;
- LActivate(TRUE,myList);
- SpoolFill(myList,&volume,&dirID);
- DrawDialog(myDialog);
- LAutoScroll(myList);
- LUpdate(myDialog->visRgn,myList);
- InsetRect(&listRect,-1,-1);
- FrameRect(&listRect);
- GetDItem(myDialog,upItem,&item,&top,&bounds);
- GetDItem(myDialog,downItem,&item,&bottom,&bounds);
- total = (**myList).dataBounds.bottom;
- if (total == 0) {
- HiliteControl(top,255);
- HiliteControl(bottom,255);
- }
- InsetRect(&okRect,-4,-4);
- PenSize(3,3);
- FrameRoundRect(&okRect,16,16);
- PenNormal();
- item = 0;
- InitCursor();
- while (item != okItem) {
- if (changed) {
- cell.h = cell.v = 0;
- if (LGetSelect(TRUE,&cell,myList)) {
- HiliteControl(top,0);
- HiliteControl(bottom,0);
- }
- else {
- HiliteControl(top,255);
- HiliteControl(bottom,255);
- }
- changed = FALSE;
- }
- ModalDialog(0L,&item);
- if (item == listItem) {
- GetMouse(&where);
- if (LClick(where,0,myList)) {
- cell.v = cell.h = 0;
- if (LGetSelect(TRUE,&cell,myList)) {
- ChangeType(cell.v,myList,&volume,&dirID);
- DrawDialog(myDialog);
- LUpdate(myDialog->visRgn,myList);
- PenSize(3,3);
- FrameRoundRect(&okRect,16,16);
- PenNormal();
- FrameRect(&listRect);
- }
- }
- changed = TRUE;
- }
- if (item == upItem) {
- cell.v = cell.h = 0;
- if (LGetSelect(TRUE,&cell,myList) && cell.v) {
- cell.h = 0;
- len = 64;
- LGetCell(&st[1],&len,cell,myList);
- st[0] = len;
- cell.h = 1;
- len = 2;
- LGetCell(&number,&len,cell,myList);
- LDelRow(1,cell.v,myList);
- LAddRow(1,0,myList);
- cell.v = cell.h = 0;
- len = st[0];
- LSetCell(&st[1],len,cell,myList);
- len = 2;
- cell.h = 1;
- LSetCell(&number,len,cell,myList);
- changed = TRUE;
- }
- }
- if (item == downItem) {
- cell.v = cell.h = 0;
- if (LGetSelect(TRUE,&cell,myList) && (cell.v != (total - 1))) {
- cell.h = 0;
- len = 64;
- LGetCell(&st[1],&len,cell,myList);
- st[0] = len;
- cell.h = 1;
- len = 2;
- LGetCell(&number,&len,cell,myList);
- LDelRow(1,cell.v,myList);
- LAddRow(1,total - 1,myList);
- cell.v = total - 1;
- cell.h = 0;
- len = st[0];
- LSetCell(&st[1],len,cell,myList);
- len = 2;
- cell.h = 1;
- LSetCell(&number,len,cell,myList);
- changed = TRUE;
- }
- }
- }
- AdjustQueue(myList,&volume,&dirID);
- LDispose(myList);
- CloseDialog(myDialog);
- SetPort(savePort);
- RestoreA4();
- return;
- asm {
- dc.b "© Copyright 1989 Apple Computer, Inc. By Ricardo Batista"
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-